package baitap.giaodien2;

import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;

import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.TitledBorder;

public class btap2_giaodien extends JFrame {
	JPanel pn1,pnmain,pn2,pn3;
	JLabel lbmain = new JLabel("Thao tac tren JFrame");
	
	
public btap2_giaodien (String name2) {
	super(name2);
	//pn
	
	pnmain = new JPanel();
	pnmain.setLayout(new GridBagLayout());
	GridBagConstraints con = new GridBagConstraints();
	TitledBorder titlemain = new TitledBorder("Panel Main");
	pnmain.setBorder(titlemain);
	
	
	
	
	
	pn1 = new JPanel();
	pn1.setLayout(new FlowLayout());
	
	TitledBorder title1 = new TitledBorder("Chon tac vu");
	pn1.setBorder(title1);
	pn1.setBounds(10,30,200,300);
	
	pn2= new JPanel();
	pn2.setLayout(new FlowLayout());
	TitledBorder title2 = new TitledBorder("Nhap thong tin");
	pn2.setBorder(title2);
	pn2.setBounds(210,30,200,300);
	
	pn3= new JPanel();
	TitledBorder title3 = new TitledBorder("thi truong");
	pn3.setBorder(title3);
	
	
	pnmain.add(lbmain);
	con.gridx = 0;
	con.gridy = 1;
	
	pnmain.add(pn1,con);
	con.gridx = 1;
	con.gridy = 0;
	pnmain.add(pn2);
	
	this.add(pnmain);
	
}
protected void addControl() {
	
}
}
